package Test;

import main.genericArrayPack;



public class arrayTest {
    private int ID;
    private String name;
    private int height;
    private int age;

    public arrayTest(int ID,String name,int height,int age) {
        this.ID=ID;
        this.name = name;
        this.height=height;
        this.age=age;
    }
    @Override
    public String toString() {
        return String.format("cat(ID:%d,name:%s, height:%d,age:%d)", ID,name,height,age);
    }

    public static void main(String[] args) {
        genericArrayPack<arrayTest> genericarraypack=new genericArrayPack<>();
        genericarraypack.InsertFirst(new arrayTest(2,"喵喵",45,3));
        genericarraypack.Insert(0,new arrayTest(1,"小花",32,5));
        genericarraypack.InsertLast(new arrayTest(3,"淘淘",44,8));
        genericarraypack.selectAll();
        System.out.println(genericarraypack.delete(1));
        genericarraypack.update(1,new arrayTest(4,"跳跳",15,2));
        System.out.println(genericarraypack.selectLocation(1));
    }
}
